﻿using AppsModel.Models;
using MVC_basic.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO.Compression;
using System.Linq;
using System.Web;

namespace MVC_basic.ViewModels
{
    public class CajaAppViewModel
    {
        [Required]
        [Display(Name = "App-Name")]
        public string name { get; set; }

        [Required]
        [Display(Name = "URL to a pic of your logo")]
        public string logoUrl { get; set; }

        [Display(Name = "urls to domains you want access to separeted with comma")]
        public string acceptedUrl { get; set; }

        public static CajaAppViewModel convert(CajaApp app)
        {
            CajaAppViewModel vm = new CajaAppViewModel() { logoUrl = app.logoUrl, name = app.name, acceptedUrl = app.acceptedUrl };
            return vm;
        }
    }
}